Pathlib is taking an os.PathLike object and interpereting it as bool